# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-calculator
pkgver=40.1
pkgrel=1
pkgdesc="GNOME Scientific calculator"
url="https://wiki.gnome.org/Apps/Calculator"
arch=(x86_64)
license=(GPL)
depends=(gtk3 dconf gtksourceview4 mpfr libsoup libmpc libgee libhandy) 
makedepends=(yelp-tools vala git meson gobject-introspection)
groups=(gnome)
_commit=b1cb3f221a9418870b772035cf0ace58e25f0525  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-calculator.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
